<?php
/**
 * 程序入口(控制层)
 * @author:yubing
 * */
define('IN_ADMIN',true);
session_start();
//载入通用配置文件
include  '../include/config.php';
//@ini_set('default_charset','utf-8');
$isLogin = isset($_SESSION['admin']);
//$isLogin = false;
//判断登录
if ($isLogin != true) {
    $mod = 'login';
} else {
    $mod = !get($_GET,'mod') ? 'index' : string::filter(get($_GET,'mod'));
}


//执行模块层
try {
	include $file = sprintf('%s/modules/%s.php',dirname(__FILE__) , str_replace('_','/',$mod));
	$act =  string::filter(get($_REQUEST,'act','index'));
    $act();
} catch (Exception $e){
    print_r($e);
}